package com.example.test;

import com.example.test.fun.CaseMatcher;
import com.example.test.fun.CaseProcessor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class CriminalCaseHandler implements CaseHandler {

    @Override
    public CaseMatcher matcher() {
        return caseContext -> "criminal".equalsIgnoreCase(caseContext.getCaseType());
    }

    @Override
    public CaseProcessor processor() {
        return context -> {
            log.info("处理刑事案件：{}", context.getCaseId());
            // 具体处理逻辑
        };
    }
}
